import requests

import requests
import json
url1= "http://bitest.tclking.com"
url2="/authority/api/login"

data= {"username":"ex_zhanpeng.yao","password":
    "OtdRavoe6KExNB2qEdeUIN9X8NASXd8PFqIhW1rnYBkdIcXu2WP1zdjtUZ2fLzhOZfBS3wxZ"
    "d2tabKXmkFXFRYlgjT8SOpCh2kPVZ1eXltjGYNoysZBjnpzbkJmA/xlVa0Seka6vm5QxppvgB"
    "P/7eMkK74YzZLrBmZO0rRLhufs="}
def post_test_api(url2,data):
    resp=requests.post(url1+url2,data=data)
    # pprint(resp.status_code)
    # pprint(resp.headers)
    # pprint(resp.text)
    # print(type(resp.text))
    j= json.loads(resp.text)
    # print(j)
    token= j["data"]["token"]
    return token